#include <stdio.h>
#include <stdlib.h>
int num,place;
void invert(int num, int place);
int main(void)
 { 
scanf("%d",&num); 
if (num>99) 
place=3; 
else if (num>9) 
place=2; 
else 
place=1; 
invert(num,place);
system("pause");
return 0;
}
void invert(int num1, int place1)
{
  int i, j, k; 
  i = num1/100; 
j = num1%100/10; 
k = num1%100%10; 
if (place==3) 
printf("%d%d%d\n",k,j,i); 
else if (place1 == 2)
 printf("%d%d\n",k,j); 
 else
 printf("%d\n",k); 
}

